package com.len.core.token;

import java.util.Date;

import org.apache.shiro.authc.AuthenticationToken;

import com.len.entity.SysUser;
import com.len.util.AESUtil;

import lombok.Data;
import lombok.ToString;

/**
 * 密码验证令牌
 * @author karlwang
 * @Time：2018年7月20日 下午2:03:08
 * @version 1.0  
 * Function: TODO
 */
@Data
@ToString
public class PasswordToken implements AuthenticationToken{

    private static final long serialVersionUID = 1L;
    private String username;
    private String password;
    private String timestamp;
    private String host;
    private String tokenKey;

    public PasswordToken(String username, String password, String timestamp, String host,String tokenKey) {
        this.username = username;
        this.timestamp = timestamp;
        this.host = host;
        //些处进行密码加密md5+盐
        this.password = password;
        this.tokenKey = tokenKey;

    }

    /* (non-Javadoc)
     * @see org.apache.shiro.authc.AuthenticationToken#getPrincipal()
     */
    @Override
    public Object getPrincipal() {
        // TODO Auto-generated method stub
        return this.username;
    }

    /* (non-Javadoc)
     * @see org.apache.shiro.authc.AuthenticationToken#getCredentials()
     */
    @Override
    public Object getCredentials() {
        // TODO Auto-generated method stub
        return this.password;
    }
    
}
